<!--
 * @Author: 胡海
 * @Date: 2020-04-07 01:04:35
 * @LastEditors: 胡海
 * @LastEditTime: 2020-04-07 02:33:36
 * @Description: 
 -->
<template>
<!-- 修改 -->
  <div class="addForm">
    <el-form ref="addForm" :model="addForm" label-width="80px" size="mini">
      <el-row>
        <el-col :span="24">
          <el-form-item label="商品名称">
            <el-input v-model="addForm.name"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="商品价格">
            <el-input v-model="addForm.price"></el-input>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="简介">
            <el-input v-model="addForm.txt"></el-input>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <el-form-item label="用户类型">
            <el-select v-model="addForm.type" placeholder="请选择">
              <el-option
                v-for="(item,idex) in rolesOptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              ></el-option>
            </el-select>
          </el-form-item>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="hh-box-center">
            <el-button size="mini" @click="close">取 消</el-button>
            <el-button size="mini" type="primary" @click="submite">确 定</el-button>
          </div>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
import { cpType } from "@/utils/filter/osjj";
export default {
  props: {
    AEform: {
      type: Object,
      default() {
        return {};
      }
    }
  },
  components: {},
  data() {
    return {
      rolesOptions: cpType
    };
  },
  created() {},
  mounted() {},
  watch: {},
  computed: {
    addForm() {
      return this.AEform;
    }
  },
  methods: {
    close() {
      this.$emit("close");
    },
    submite() {
      this.$emit("submite", this.addForm);
    }
  }
};
</script>

<style scoped lang="scss">
</style>
